package cn.lzm.examplespringbootconsumer;

import cn.hutool.json.JSONUtil;
import cn.lizemin.entity.User;
import cn.lizemin.service.UserApi;
import cn.lzm.annotation.RpcReference;
import org.springframework.stereotype.Service;

/**
 * @author lzm
 * @Date 2024/11/9
 * @description
 */
@Service
public class ExampleServiceImpl {

    @RpcReference
    private UserApi userApi;

    public void test() {
        User user = userApi.getUserById(200);
        System.out.println(JSONUtil.toJsonStr(user));
    }
}
